#!/bin/sh
set -exo pipefail

unzip windows-x86_64.zip
unzip BrogueCE-windows-x86_64.zip
cd BrogueCE-windows
chmod +x brogue.exe
./brogue.exe
cd ..

unzip linux-x86_64.zip
tar -xaf BrogueCE-linux-x86_64.tar.gz
cd BrogueCE-linux
./brogue
cd ..

unzip macos-x86_64.zip
unzip -l BrogueCE-macos-x86_64.zip

version=1.14
cp BrogueCE-windows-x86_64.zip BrogueCE-${version}-windows-x86_64.zip
cp BrogueCE-macos-x86_64.zip BrogueCE-${version}-macos-x86_64.zip
cp BrogueCE-linux-x86_64.tar.gz BrogueCE-${version}-linux-x86_64.tar.gz
